import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 导入初始化样式
import './styles/common.less'
// 引入封装好的组件 全局使用
import components from '@/components/index'
// 导入插件
import defineDirective from '@/directives'

// // 测试路由
// import request from './utils/request'

// console.log(request('/test', 'GET', { name: 'jinbai' }))
// request('/test', 'GET', { name: 'jinbai' }).then(res => {
//   console.log(res)
// })
// // 测试vuex
// store.commit('user/setProfile', '12')

// createApp生成应用实例对象 -> 调用use方法注册各种插件 -> 挂载到真实dom
createApp(App).use(store).use(router).use(components).use(defineDirective).mount('#app')
